An excessively large force may be applied to a main spindle of a machine tool such as an NC milling machine, when a tool is broken during a process for machining a workpiece or when a tool collides with the workpiece.
In order to prevent the above problems, for example, JP-A-3-3687 discloses a method of preventing collision of a body driven by a servomotor. According to the method, when collision is detected, the servomotor receives a predetermined speed command, the direction of which is reverse to that of the actual speed of the servomotor, for a predetermined period of time so as to reverse the servomotor.